home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Graphics / Plotting / aa_Intel_Only / Gnuplot / Unused / 0FAQ < prev    next >
Encoding:
Internet Message Format  |  1995-06-12  |  19.1 KB

  1. Date: 14 Apr 1993 15:47:57 GMT
  2. Summary: This is the FAQ (Frequently Answered Questions) list of the
  3.      comp.graphics.gnuplot newsgroup, which discusses the
  4.          gnuplot program for plotting 2D - and 3D - graphs.
  5.  
  6. Archive-name: graphics/gnuplot-faq
  7. Version: $Header: c:/alex/gwork/RCS/0faq%v 3.38.2.118 1993/04/19 23:29:06 woo Exp woo $
  8.  
  9. This is the FAQ (Frequently Answered Questions) list of the
  10. comp.graphics.gnuplot newsgroup, which discusses the gnuplot program for
  11. plotting 2D - and 3D - graphs.
  12.  
  13. Most of the information in this document came from public discussion on
  14. comp.graphics.gnuplot; quotations are believed to be in the public
  15. domain.
  16.  
  17. Here's a list of the questions.  If you are looking for the answer for a
  18. specific question, look for the string Qxx:  at the beginning of a line,
  19. with xx being the question number.
  20.  
  21. Questions:
  22.  
  23. Section 0: Meta - Questions
  24. Q0.1: Where do I get this document?
  25. Q0.2: Where do I send comments about this document?
  26.  
  27. Section 1: General Information
  28. Q1.1: What is gnuplot?
  29. Q1.2: How did it come about and why is it called gnuplot?
  30. Q1.3: Does gnuplot have anything to do with the FSF and the GNU project?
  31. Q1.4: What does gnuplot offer?
  32. Q1.5: Is gnuplot suitable for batch processing?
  33. Q1.6: Can I run gnuplot on my computer?
  34.  
  35. Section 2: Setting it up
  36. Q2.1: What is the current version of gnuplot?
  37. Q2.2: Where can I get gnuplot?
  38. Q2.3: How do I get gnuplot to compile on my system?
  39. Q2.4: What documentation is there, and how do I get it?
  40.  
  41. Section 3: Working with it
  42. Q3.1: How do I get help?
  43. Q3.2: How do I print out my graphs?
  44. Q3.3: How do I include my graphs in <word processor>?
  45.  
  46. Section 4: Wanted Features in gnuplot
  47. Q4.1: Does gnuplot have hidden line removal?
  48. Q4.2: Does gnuplot support boxes?
  49.  
  50. Section 5: Miscellaneous
  51. Q5.1: I've found a bug, what do I do?
  52. Q5.2: Can I use gnuplot routines for my own programs?
  53. Q5.3: What extensions have people made to gnuplot? Where can I get them?
  54. Q5.4: Can I do heavy - duty data processing with gnuplot?
  55. Q5.5: I have ported gnuplot to another system, or patched it. What do I do?
  56. Q5.6: Where can I get a beta version of Gnuplot 3.3?
  57.  
  58. Section 6: Making life easier
  59. Q6.1: How do I plot two functions in non - overlapping regions?
  60. Q6.2: How do I run my data through a filter before plotting?
  61. Q6.3: How do I make it easier to use gnuplot with LaTeX?
  62. Q6.4: Why does gnuplot ignore my very small numbers?
  63.  
  64. Section 7: Credits
  65.  
  66. Questions and Answers:
  67.  
  68. Section 0: Meta - Questions.
  69.  
  70. Q0.1: Where do I get this document?
  71.  
  72. This document is posted about once every four weeks to the newsgroups
  73. comp.graphics.gnuplot, comp.answers and news.answers.  Like many other
  74. FAQ's, it is available via anonymous ftp from rtfm.mit.edu [18.172.1.27]
  75. from the directory /pub/usenet/news.answers under the Archive-Name:  at
  76. the top of the article, graphics/gnuplot-faq.
  77.  
  78. Q0.2: Where do I send comments about this document?
  79.  
  80. Send comments, suggestions etc. via e-mail to Thomas Koenig,
  81. ig25@rz.uni-karlsruhe.de or ig25@dkauni2.bitnet.
  82.  
  83. Section 1: General Information
  84.  
  85. Q1.1: What is gnuplot?
  86.  
  87. Gnuplot is a command-driven interactive function plotting program.  It
  88. can be used to plot functions and data points in both two- and three-
  89. dimensional plots in many different formats, and will accomodate many of
  90. the needs of today's scientists for graphic data representation.
  91. Gnuplot is copyrighted, but freely distributable; you don't have to pay
  92. for it.
  93.  
  94. Q1.2: How did it come about and why is it called gnuplot?
  95.  
  96. The authors of gnuplot are:
  97.  
  98. Thomas Williams, Colin Kelley, Russell Lang, Dave Kotz, John Campbell,
  99. Gershon Elber, Alexander Woo and many others.
  100.  
  101. The following quote comes from Thomas Williams:
  102.  
  103. I was taking a differential equation class and Colin was taking
  104. Electromagnetics, we both thought it'd be helpful to visualize the
  105. mathematics behind them.  We were both working as sys admin for an EE
  106. VLSI lab, so we had the graphics terminals and the time to do some
  107. coding.  The posting was better recieved than we expected, and prompted
  108. us to add some, albeit lame, support for file data.
  109.  
  110. Any reference to GNUplot is incorrect.  The real name of the program
  111. is "gnuplot".  You see people use "Gnuplot" quite a bit because many
  112. of us have an aversion to starting a sentence with a lower case
  113. letter, even in the case of proper nouns and titles.  Gnuplot is not
  114. related to the GNU project or the FSF in any but the most peripheral
  115. sense.  Our software was designed completely independently and the
  116. name "gnuplot" was actually a compromise.  I wanted to call it
  117. "llamaplot" and Colin wanted to call it "nplot."  We agreed that
  118. "newplot" was acceptable but, we then discovered that there was an
  119. absolutely ghastly pascal program of that name that the Computer
  120. Science Dept. occasionally used.  I decided that "gnuplot" would make
  121. a nice pun and after a fashion Colin agreed.
  122.  
  123. Q1.3: Does gnuplot have anything to do with the FSF and the GNU project?
  124.  
  125. No.  Gnuplot is not covered by the General Public License, either.
  126.  
  127. Q1.4: What does gnuplot offer?
  128.  
  129. - Plotting of two - dimensional functions and data points in many different
  130.   styles (points, lines, error bars)
  131. - plotting of three - dimensional data points and surfaces in many
  132.   different styles (contour plot, mesh).
  133. - support for complex arithmetic
  134. - self - defined functions
  135. - support for a large number of operating systems, graphics file formats
  136.   and devices
  137. - extensive online help
  138. - labels for title, axes, data points 
  139. - command line editing and history on most platforms
  140.  
  141. Q1.5: Is gnuplot suitable for batch processing?
  142.  
  143. Yes.  You can read in files from the command line, or you can redirect
  144. your standard input to read from a file.  Both data and command files
  145. can be generated automatically, from data aquisition programs or
  146. whatever else you use.
  147.  
  148. Q1.6: Can I run gnuplot on my computer?
  149.  
  150. Gnuplot is available for a number of platforms.  These are:  UNIX (X11
  151. and NeXTSTEP), VAX/VMS, OS/2, MS-DOS, Amiga, MS-Windows and OS-9/68k.
  152. Modifications for Macintosh (Think - C 3.0) exist and are part of the
  153. gpcontrib distribution; they are untested.  Modifications for NEC 8901
  154. are said to exist (where?).  A version for the Atari ST exists at
  155. atari.archive.umich.edu, but is unstable.
  156.  
  157. Section 2: Setting it up
  158.  
  159. Q2.1: What is the current version of gnuplot?
  160.  
  161. The current version of gnuplot is 3.2, patchlevel 2.  Version 3.3
  162. is currently in beta test.
  163.  
  164. Q2.2: Where can I get gnuplot?
  165.  
  166. The official distribution site for the gnuplot source is dartmouth.edu
  167. [129.170.16.4], the file is called /pub/gnuplot/gnuplot.3.2.tar.Z.
  168. Official mirrors of that distribution are (for Australia)
  169. monu1.cc.monash.edu.au [130.194.1.101] and (for Europe) irisa.irisa.fr
  170. [131.254.2.3].  You can also get it from your friendly neighbourhood
  171. comp.sources.misc archive.
  172.  
  173. MS-DOS binaries are available from oak.oakland.edu (North America)
  174. [141.210.10.117] as pub/msdos/plot/gnuplt32.zip, garbo.uwasa.fi (Europe)
  175. [128.214.87.1] as /pc/plot/gnup32.zip and archie.au (Australia)
  176. [139.130.4.6] as micros/pc/oak/plot/gnuplt32.zip.  An version for MS-DOS
  177. with at least a 386 is to be found at simtel-20 and its numerous
  178. mirrors, for example
  179.  
  180. wuarchive.wustl.edu:/mirrors/msdos/plot/gplot386.zip [128.252.135.4]
  181. sun0.urz.uni-heidelberg.de:/pub/msdos/simtel/plot/gplot386.zip
  182.     [129.206.100.126]
  183. isfs.kuis.kyoto-u.ac.jp:/mirrors/simtel20.msdos/plot [130.54.20.1]
  184.  
  185. OS/2 2.0 binaries are at ftp-os2.nmsu.edu [128.123.35.151], in
  186. /pub/os2/unix/gnu/gnuplt32.zip .
  187.  
  188. Amiga sources and binaries are available from ux1.cso.uiuc.edu 
  189. [128.174.5.59] as /pub/amiga/fish/f7/ff701/gnuplot.lzh.
  190.  
  191. The NeXTSTEP frontend can be found at sonata.cc.purdue.edu and
  192. cs.orst.edu.
  193.  
  194. An MS-Windows Version is available, among other servers, from
  195. ftp.cica.indiana.edu:/pub/pc/win3/uploads/DEC92/wgnuplot.zip.
  196. Please note that wgpt3382.zip is an extremely early alpha version
  197. and should not be used.
  198.  
  199. A version for OS-9/68K can be found at cabrales.cs.wisc.edu
  200. [128.105.36.20] as /pub/OSK/GRAPHICS/gnuplot32x.tar.Z; it includes both
  201. X-Windows and non - X-windows versions.
  202.  
  203. People without ftp access can use an ftp-mail server; send mail to
  204. bitftp@pucc.bitnet (for BITNET only) or ftpmail@decwrl.dec.com with the
  205. word 'help' in the mail body for more information.
  206.  
  207. It is a good idea to look for a nearby ftp site when downloading things.
  208. You can use archie for this.  See if an archie client is installed at
  209. your system (by simply typing archie at the command prompt), or send
  210. mail to archie@sura.net with the word 'help' in both the subject line
  211. and the body of the mail.  However, be aware that the version you find
  212. at a near ftp site may well be out of date; check the last modification
  213. date and the number of bytes against the newest release at one of the
  214. official servers.
  215.  
  216. Q2.3: How do I get gnuplot to compile on my system?
  217.  
  218. As you would any other installation.  Read the files README and
  219. README.Install, edit the Makefile according to taste, and run make or
  220. whatever is suitable for your operating system.
  221.  
  222. If you get a complaint about a missing file libplot.a or something
  223. similar when building gnuplot for x11, remove -DUNIXPLOT from the
  224. TERMFLAGS= line, remove -lplot from the LIBS= line and run again.  If
  225. you are making x11 on a sun, type 'make x11_sun'.
  226.  
  227. Q2.4: What documentation is there, and how do I get it?
  228.  
  229. The documentation is included in the source distribution.  Look at the
  230. docs subdirectory, where you'll find
  231.  
  232.  - a unix man page, which says how to start gnuplot
  233.  - a help file, which also can be printed as a manual
  234.  - a tutorial on using gnuplot with latex
  235.  - a quick reference summary sheet for TeX only
  236.  
  237. Postscript copies of the documentation can be ftp'd from dartmouth.edu,
  238. in pub/gnuplot, as manual.ps.Z and tutorial.ps.Z
  239.  
  240.  
  241. Section 3: Working with it
  242.  
  243. Q3.1: How do I get help?
  244.  
  245. Give the 'help' command at the initial prompt.  After that, keep
  246. looking through the keywords.  Good starting points are 'plot'
  247. and 'set'.
  248.  
  249. Read the manual, if you have it.
  250.  
  251. Ask your colleagues, the system administrator or the person who set
  252. up gnuplot.
  253.  
  254. Post a question to comp.graphics.gnuplot or send mail to the gatewayed
  255. mailing list info-gnuplot@dartmouth.edu.  If you want to subscribe to
  256. the mailing list, send mail to info-gnuplot-request@dartmouth.edu,
  257. but please don't do this if you can get comp.graphics.gnuplot directly.
  258. If you pose a question there, it is considered good form to solicit
  259. e-mail replies and post a summary.
  260.  
  261. Q3.2: How do I print out my graphs?
  262.  
  263. The kind of output produced is determined by the 'set terminal' command;
  264. for example, 'set terminal postscript' will produce the graph in
  265. postscript format.  Output can be redirected using the 'set output'
  266. command.
  267.  
  268. As an example, the following prints out a graph of sin(x) on a UNIX
  269. machine running X - Windows.
  270.  
  271. gnuplot> plot [-6:6] sin(x)
  272. gnuplot> set terminal postscript
  273. Terminal type set to 'postscript'
  274. Options are 'landscape monochrome "Courier" 14'
  275. gnuplot> set output "sin.ps"
  276. gnuplot> replot
  277. gnuplot> set output                      # set output back to default
  278. gnuplot> set terminal x11                # dto. for terminal type
  279. gnuplot> ! lp -ops sin.ps                # print ps - File (site dependent)
  280. request id is lprint-3433 (standard input)
  281. lp: printed file sin.ps on fg20.rz.uni-karlsruhe.de (5068 Byte)
  282. !
  283. gnuplot> 
  284.  
  285. Q3.3: How do I include my graphs in <word processor>?
  286.  
  287. This depends on the kind of word processor you use.
  288.  
  289. Many word processors can use encapsulated postscript for graphs.  This
  290. can be generated by the 'set terminal postscript eps' command.  Most
  291. MS-DOS word processors understand HPGL (terminal type hpgl).
  292.  
  293. With TeX, it depends on what you use to print your dvi files.  If you
  294. use dvips or dvi2ps, you can use encapsulated postscript.  For
  295. emtex (popular for MS-DOS), you can use emtex, otherwise use the
  296. latex terminal type, which generates a picture environment.
  297.  
  298. If nothing else helps, try using the pgm or ppm format and converting it
  299. to a bitmap format your favourite word processor can understand.  An
  300. invaluable tool for this is Jeff Poskanzer's PPMPLUS package.
  301.  
  302.  
  303. Section 4:  Wanted Features in gnuplot
  304.  
  305. Q4.1: Does gnuplot have hidden line removal?
  306.  
  307. Version 3.3 supports hidden line removal on all platforms except MS-DOS.
  308. If someone can solve the 64K DGROUP memory problem, it would support
  309. hidden line removal there as well.  Version 3.2 supports hidden line
  310. removal.
  311.  
  312. Q4.2: Does gnuplot support boxes?
  313.  
  314. Version 3.3 will.
  315.  
  316.  
  317. Section  5:  Miscellaneous
  318.  
  319. Q5.1: I've found a bug, what do I do?
  320.  
  321. First, try to see wether it actually is a bug, or wether it is a feature
  322. which may be turned off by some obscure set - command.  If you have a
  323. fairly general sort of bug report, posting to comp.graphics.gnuplot is
  324. probably the way to go.  If you have investigated a problem in detail,
  325. especially if you have a context diff that fixes the problem, please
  326. e-email a report to bug-gnuplot@dartmouth.edu.  The bug-gnuplot list
  327. is for reporting and collecting bug fixes, the comp.graphics.gnuplot
  328. mailing list will be more help for finding work arounds or actually
  329. solving gnuplot related problems.  If you do send in a bug report, be
  330. sure and include the version of gnuplot (including patchlevel), terminal
  331. driver, operating system, an exact description of the bug and input
  332. which can reproduce the bug.  Also, any context diffs should be
  333. referenced against the latest official version of gnuplot if at all
  334. possible.
  335.  
  336. Q5.2: Can I use gnuplot routines for my own programs?
  337.  
  338. Yes.  John Campbell <jdc@nauvax.ucc.nau.edu> has written gplotlib, a
  339. version of gnuplot as C subroutines callable from a C program.  This is
  340. available as gplotlib.tar.Z on the machine ftp.nau.edu in the directory
  341. /pub/gplotlib.tar.Z.  It is also included in the gpcontrib distribution
  342. in the campbell subdirectory.
  343.  
  344. Q5.3: What extensions have people made to gnuplot? Where can I get them?
  345.  
  346. Extensions have been put into the file gpcontrib.tar.Z, which will
  347. officialy be available with the 3.3 release.  If you are lucky, you
  348. will be able to download it from
  349.  
  350. rsm2.physics.uiuc.edu:~ftp/pub/gnuplot/gpcontrib.tar.Z.
  351.  
  352. Its contains the following subdirectories:
  353.  
  354. byrne subdirectory:
  355.     From: "Margaret R. Byrne" <mrb2j@kelvin.seas.virginia.edu>
  356.     Subject: congp3d3 preprocessor to draw contour plots on
  357.         irregular regions.
  358. clark subdirectory:
  359.     From: Michael Clark <clarkmp@prony.Colorado.EDU>
  360.     Subject: data filtering: adds point_skip & point_offs
  361. hanna subdirectory:
  362.     From: gregor@kafka.saic.com (gregg hanna)
  363.     Subject: x11-library mode, gnulib_x11.[c,h], xlibtest.c,makefile.xlib
  364. yamamoto subdirectory:
  365.         From: "NOBORU YAMAMOTO     " <sun!kekvax.kek.jp!YAMAMOTO@pixar.com>
  366.     Subject: Re: gnuplot on Apple Macintosh, "diff -c" of version 3.0
  367. russo subdirectory:
  368.     From: russo@rudedog.nrl.navy.mil
  369.     Subject: gnuplotio bidirectional pipe C-library
  370. woo subdirectory:
  371.     From: "Alex Woo" <woo@ra-next.arc.nasa.gov>
  372.     Subject: two additional title lines and fixes to errorbar style
  373. green subdirectory:
  374.     From: Roque Donizete de Oliveira <oliveria@engin.umich.edu>
  375.     Subject: Postscript greek symbols in gnuplot, new prologue
  376.  
  377. Q5.4: Can I do heavy - duty data processing with gnuplot?
  378.  
  379. Gnuplot alone is not suited very well for this.  One thing you might try
  380. is fudgit, an interactive multi-purpose fitting program written by
  381. Martin-D. Lacasse.  It can use gnpulot as its graphics back end and is
  382. available from ftp.physics.mcgill.ca:/pub/Fudgit/fudgit_2.27.tar.Z
  383. [132.206.9.13], and from the main Linux server, tsx-11.mit.edu
  384. [18.172.1.2] and its numerous mirrors around the world.  Versions are
  385. available for AIX, HP-UX, IRIX 4, Linux, NeXT, Sun3, Sun4 and Ultrix.
  386.  
  387. You might also want to look at the applications developed by the
  388. Software Tools Group (STG) at the National Center for Supercomputing
  389. Applications.  Ftp to ftp.ncsa.uiuc.edu [141.142.20.50] and get the
  390. file README.BROCHURE for more information.
  391.  
  392. Q5.5: I have ported gnuplot to another system, or patched it. What do I do?
  393.  
  394. If your patch is small, mail it to bug-gnuplot@dartmouth.edu, with
  395. a thorough description of what the patch is supposed to do, which version
  396. of gnuplot it is relative to, etc.  Please don't mail it to the FAQ
  397. maintainer.
  398.  
  399. If your modifications are extensive (such as a port to another system),
  400. upload your modifications to dartmouth.edu:/pub/dropoff.  Please drop a
  401. note to David.Kotz@dartmouth.edu, the maintainer of the gnuplot
  402. subdirectory there, plus a note to bug-gnuplot@dartmouth.edu.
  403.  
  404. Q5.6: Where can I get a beta version of Gnuplot 3.3?
  405.  
  406. You should be able to get it from one of the following sites (not
  407. necessarily all of them):
  408.  
  409. sun.soe.clarkson.edu:~ftp/submit/gnuplot3_3b9.tar.Z
  410. cygnus.com:~ftp/incoming/gnuplot3_3b9.tar.Z
  411. rsm2.physics.uiuc.edu:~ftp/pub/gnuplot/gnuplot3_3b9.tar.Z
  412.  
  413. (where the 3_3b9 part is subject to change).
  414.  
  415.  
  416. Section 6: Making life easier
  417.  
  418. Q6.1: How do I plot two functions in non - overlapping regions?
  419.  
  420. Use a parametric plot.  An example:
  421.  
  422. set parametric
  423. a=1
  424. b=3
  425. c=2
  426. d=4
  427. x1(t) = a+(b-a)*t
  428. x2(t) = c+(d-c)*t
  429. f1(x) = sin(x)
  430. f2(x) = x**2/8
  431. plot [t=0:1] x1(t),f1(x1(t)) title "f1", x2(t), f2(x2(t)) title "f2"
  432.  
  433. Q6.2: How do I run my data through a filter before plotting?
  434.  
  435. If your system supports the popen() - function, as UNIX does, you should
  436. be able to run the output through another process such as a short awk
  437. program (use the "help plot datafile" command for an example).
  438. Unfortunately, in 3.2, there is a rather short limitation on the maximum
  439. argument length, so your command line may be truncuated (usually, this
  440. will mean that awk cannot find the filename).  Also, you may need to
  441. escape the $ - characters in your awk programs.
  442.  
  443. Version 3.3 will include the thru - keyword for the plot command for
  444. running datafiles through a Gnuplot - defined function.
  445.  
  446. Q6.3: How do I make it easier to use gnuplot with LaTeX?
  447.  
  448. There is a set of latex macros and shell scripts that are meant to
  449. make your life easier when using gnuplot with LaTeX. This package can
  450. be found on dartmouth.edu [129.170.16.4] in pub/gnuplot/latex.shar, by
  451. David Kotz.  For example, the program "plotskel" can turn a
  452. gnuplot-output file plot.tex into a skeleton file skel.tex, that has
  453. the same size as the original plot but contains no graph. With the
  454. right macros, the skeleton can be used for preliminary latex passes,
  455. reserving the full graph for later passes, saving tremendous amounts
  456. of time.
  457.  
  458. Q6.4: Why does gnuplot ignore my very small numbers?
  459.  
  460. Gnuplot treats all numbers less than 1e-08 as zero, by default.  Thus,
  461. if you are trying to plot a collection of very small numbers, they may
  462. be plotted as zero.  Worse, if you're plotting on a log scale, they will
  463. be off scale.  Or, if the whole set of numbers is "zero", your range may
  464. be considered empty:
  465.  
  466. gnuplot> plot 'test1'
  467. Warning: empty y range [4.047000e-19:3.000000e-11], adjusting to [-1:1]                y_min should not equal y_max!
  468. gnuplot> set yrange [4.e-15:3.0e-11]
  469. gnuplot> plot 'test1'
  470.      y range is less than `zero`
  471.  
  472. The solution is to change gnuplot's idea of "zero":
  473.     set zero 1e-20
  474. For more information,
  475.     help set zero
  476.  
  477. Section 7: Credits
  478.  
  479. This list was initially compiled by John Fletcher with contributions
  480. from Russell Lang, John Campbell, David Kotz, Rob Cunningham, Dan Lewart
  481. and Alex Woo.  Reworked by Thomas Koenig from a draft by Alex Woo, with
  482. corrections and additions from Alex Woo, John Campbell, Russell Lang, and
  483. David Kotz.
  484. -- 
  485. Thomas Koenig, ig25@rz.uni-karlsruhe.de, ig25@dkauni2.bitnet
  486. The joy of engineering is to find a straight line on a double
  487. logarithmic diagram.
  488.  
  489.